<!doctype html>
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
         language="java" %>
<%@ include file="/jsp/mobile/include/include.jsp" %>
<html lang="cn">
<head>
    <%@ include file="/jsp/mobile/include/header.jsp" %>
    <title>微信通知绑定</title>
</head>
<body class="nobg">
<form id="notifyForm" action="<%=request.getContextPath()%>/mobile/offline/notifychange">
    <input type="hidden" name="openId" value="${openId}">

    <div class="main">
        <div class="sinfo">
            <div class="sfb">
                <i class="ico ico32"></i> <input id="telephone" name="telephone"
                                                 type="tel" class="text" placeholder="请输入商户账户">
            </div>
            <div class="sfb">
                <i class="ico ico33"></i> <input id="password" name="password"
                                                 type="password" class="text" placeholder="请输入密码">
            </div>
        </div>
        <div class="payOk">
            <div class="nbtn mt20">
                <a class="butn" href="javascript:next();">绑定</a>
            </div>

        </div>
    </div>
</form>
<script type="text/javascript">
    function next() {
        var _telephone = $("#telephone").val().trim();
        var _password = $("#password").val().trim();
        var _msg = "";
        
        var reg=/^1[0-9]{10}/;
 
        if (_telephone == '') {
            _msg += "输入商户账户\r\n";
        //} else if (!$.phone(_telephone)) {
        //177的检验不出来2016.11.15 wenjw 
        } else if (!reg.test($("#telephone").val())) { 
            _msg += "商户账户不正确\r\n";
        }

        if (_password == '') {
            _msg += "输入密码\r\n";
        }
        if (_msg == "") {
            $("#notifyForm").submit();
        } else {
            window.openMsg(_msg, 3);
        }
    }
</script>
</body>
</html>